import request from '@/utils/request'
import defaultSettings from '@/settings'

// STP设置列表查询
export const apiUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstall/search`,
}

// STP设置审核列表查询
export const approveUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstallApprove/search`,
}

// STP关键字列表查询
export const keywordSearchUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstall/keywordSearch`,
}

// STP设置详情
export function stpInstallDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstall/detail`,
    method: 'get',
    params: data,
  })
}

// STP设置修改提交
export function stpInstallSave(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstall/save`,
    method: 'post',
    data,
  })
}

// STP关键字列表查询
export function stpKeywordDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstall/detail`,
    method: 'get',
    params: data,
  })
}


// STP设置审核详情
export function stpInstallApproveDetail(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstallApprove/detail`,
    method: 'get',
    params: data,
  })
}

// STP设置审核通过
export function stpInstallApprove(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstallApprove/approve`,
    method: 'post',
    data,
  })
}

// STP设置审核拒绝
export function stpInstallReject(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstallApprove/reject`,
    method: 'post',
    data,
  })
}

// STP关键字删除
export function keywordDelete(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstall/keywordDelete`,
    method: 'post',
    data,
  })
}

// STP关键字新增保存
export function keywordAdd(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstall/keywordAdd`,
    method: 'post',
    data,
  })
}

// STP关键字新增修改
export function keywordUpdate(data) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/transactionManage/stpSetManagement/StpInstall/keywordUpdate`,
    method: 'post',
    data,
  })
}
